export default (initialState: any) => {
  console.log(initialState);

  // 在这里按照初始化数据定义项目中的权限，统一管理
  // 参考文档 https://umijs.org/docs/max/access
  const canSeeAdmin = !!(
    initialState && initialState.name !== 'dontHaveAccess'
  );

  // const canSeeButton = initialState.show;

  const canUseAdd = initialState.roleArr.includes(801);
  const canUseRemove = initialState.roleArr.includes(803);

  return {
    canSeeAdmin,
    // canSeeButton,
    canUseAdd,
    canUseRemove,

    canSeeMine: initialState.roleArr.includes(800),
  };
};
